3.1.26 \(\int \frac {1+a x}{x \sqrt {a x} \sqrt {1-a x}} \, dx\)

Optimal. Leaf size=29 \[ -\frac {2 \sqrt {1-a x}}{\sqrt {a x}}-\sin ^{-1}(1-2 a x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {16, 78, 53, 619, 216} \begin {gather*} -\frac {2 \sqrt {1-a x}}{\sqrt {a x}}-\sin ^{-1}(1-2 a x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + a*x)/(x*Sqrt[a*x]*Sqrt[1 - a*x]),x]

[Out]

(-2*Sqrt[1 - a*x])/Sqrt[a*x] - ArcSin[1 - 2*a*x]

Rule 16

Int[(u_.)*(v_)^(m_.)*((b_)*(v_))^(n_), x_Symbol] :> Dist[1/b^m, Int[u*(b*v)^(m + n), x], x] /; FreeQ[{b, n}, x
] && IntegerQ[m]

Rule 53

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Int[1/Sqrt[a*c - b*(a - c)*x - b^2*x^2]
, x] /; FreeQ[{a, b, c, d}, x] && EqQ[b + d, 0] && GtQ[a + c, 0]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> -Simp[((b*e - a*f
)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(f*(p + 1)*(c*f - d*e)), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1)
+ c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f,
 n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ
[p, n]))))

Rule 216

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[(Rt[-b, 2]*x)/Sqrt[a]]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 619

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*((-4*c)/(b^2 - 4*a*c))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rubi steps

\begin {align*} \int \frac {1+a x}{x \sqrt {a x} \sqrt {1-a x}} \, dx &=a \int \frac {1+a x}{(a x)^{3/2} \sqrt {1-a x}} \, dx\\ &=-\frac {2 \sqrt {1-a x}}{\sqrt {a x}}+a \int \frac {1}{\sqrt {a x} \sqrt {1-a x}} \, dx\\ &=-\frac {2 \sqrt {1-a x}}{\sqrt {a x}}+a \int \frac {1}{\sqrt {a x-a^2 x^2}} \, dx\\ &=-\frac {2 \sqrt {1-a x}}{\sqrt {a x}}-\frac {\operatorname {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{a^2}}} \, dx,x,a-2 a^2 x\right )}{a}\\ &=-\frac {2 \sqrt {1-a x}}{\sqrt {a x}}-\sin ^{-1}(1-2 a x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 53, normalized size = 1.83 \begin {gather*} \frac {2 \left (a x+\sqrt {a} \sqrt {x} \sqrt {1-a x} \sin ^{-1}\left (\sqrt {a} \sqrt {x}\right )-1\right )}{\sqrt {-a x (a x-1)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + a*x)/(x*Sqrt[a*x]*Sqrt[1 - a*x]),x]

[Out]

(2*(-1 + a*x + Sqrt[a]*Sqrt[x]*Sqrt[1 - a*x]*ArcSin[Sqrt[a]*Sqrt[x]]))/Sqrt[-(a*x*(-1 + a*x))]

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.10, size = 45, normalized size = 1.55 \begin {gather*} -\frac {2 \sqrt {1-a x}}{\sqrt {a x}}-4 \tan ^{-1}\left (\frac {\sqrt {1-a x}}{\sqrt {a x}+1}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(1 + a*x)/(x*Sqrt[a*x]*Sqrt[1 - a*x]),x]

[Out]

(-2*Sqrt[1 - a*x])/Sqrt[a*x] - 4*ArcTan[Sqrt[1 - a*x]/(1 + Sqrt[a*x])]

________________________________________________________________________________________

fricas [B]  time = 0.81, size = 47, normalized size = 1.62 \begin {gather*} -\frac {2 \, {\left (a x \arctan \left (\frac {\sqrt {a x} \sqrt {-a x + 1}}{a x}\right ) + \sqrt {a x} \sqrt {-a x + 1}\right )}}{a x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/x/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="fricas")

[Out]

-2*(a*x*arctan(sqrt(a*x)*sqrt(-a*x + 1)/(a*x)) + sqrt(a*x)*sqrt(-a*x + 1))/(a*x)

________________________________________________________________________________________

giac [A]  time = 1.23, size = 44, normalized size = 1.52 \begin {gather*} -\frac {\sqrt {-a x + 1} - 1}{\sqrt {a x}} + \frac {\sqrt {a x}}{\sqrt {-a x + 1} - 1} + 2 \, \arcsin \left (\sqrt {a x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/x/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="giac")

[Out]

-(sqrt(-a*x + 1) - 1)/sqrt(a*x) + sqrt(a*x)/(sqrt(-a*x + 1) - 1) + 2*arcsin(sqrt(a*x))

________________________________________________________________________________________

maple [C]  time = 0.02, size = 69, normalized size = 2.38 \begin {gather*} \frac {\left (a x \arctan \left (\frac {\left (2 a x -1\right ) \mathrm {csgn}\relax (a )}{2 \sqrt {-\left (a x -1\right ) a x}}\right )-2 \sqrt {-\left (a x -1\right ) a x}\, \mathrm {csgn}\relax (a )\right ) \sqrt {-a x +1}\, \mathrm {csgn}\relax (a )}{\sqrt {a x}\, \sqrt {-\left (a x -1\right ) a x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*x+1)/x/(a*x)^(1/2)/(-a*x+1)^(1/2),x)

[Out]

(arctan(1/2*(2*a*x-1)/(-(a*x-1)*a*x)^(1/2)*csgn(a))*x*a-2*(-(a*x-1)*a*x)^(1/2)*csgn(a))*(-a*x+1)^(1/2)*csgn(a)
/(a*x)^(1/2)/(-(a*x-1)*a*x)^(1/2)

________________________________________________________________________________________

maxima [A]  time = 0.95, size = 41, normalized size = 1.41 \begin {gather*} -\frac {2 \, \sqrt {-a^{2} x^{2} + a x}}{a x} - \arcsin \left (-\frac {2 \, a^{2} x - a}{a}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/x/(a*x)^(1/2)/(-a*x+1)^(1/2),x, algorithm="maxima")

[Out]

-2*sqrt(-a^2*x^2 + a*x)/(a*x) - arcsin(-(2*a^2*x - a)/a)

________________________________________________________________________________________

mupad [B]  time = 2.98, size = 47, normalized size = 1.62 \begin {gather*} -\frac {2\,\sqrt {1-a\,x}}{\sqrt {a\,x}}-\frac {4\,a\,\mathrm {atan}\left (\frac {a\,\left (\sqrt {1-a\,x}-1\right )}{\sqrt {a\,x}\,\sqrt {a^2}}\right )}{\sqrt {a^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*x + 1)/(x*(a*x)^(1/2)*(1 - a*x)^(1/2)),x)

[Out]

- (2*(1 - a*x)^(1/2))/(a*x)^(1/2) - (4*a*atan((a*((1 - a*x)^(1/2) - 1))/((a*x)^(1/2)*(a^2)^(1/2))))/(a^2)^(1/2
)

________________________________________________________________________________________

sympy [C]  time = 25.62, size = 71, normalized size = 2.45 \begin {gather*} a \left (\begin {cases} - \frac {2 i \operatorname {acosh}{\left (\sqrt {a} \sqrt {x} \right )}}{a} & \text {for}\: \left |{a x}\right | > 1 \\\frac {2 \operatorname {asin}{\left (\sqrt {a} \sqrt {x} \right )}}{a} & \text {otherwise} \end {cases}\right ) + \begin {cases} - 2 \sqrt {-1 + \frac {1}{a x}} & \text {for}\: \frac {1}{\left |{a x}\right |} > 1 \\- 2 i \sqrt {1 - \frac {1}{a x}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x+1)/x/(a*x)**(1/2)/(-a*x+1)**(1/2),x)

[Out]

a*Piecewise((-2*I*acosh(sqrt(a)*sqrt(x))/a, Abs(a*x) > 1), (2*asin(sqrt(a)*sqrt(x))/a, True)) + Piecewise((-2*
sqrt(-1 + 1/(a*x)), 1/Abs(a*x) > 1), (-2*I*sqrt(1 - 1/(a*x)), True))

________________________________________________________________________________________